//
//  UIImageViewDemo.swift
//  firstProject
//
//  Created by 张彦辉 on 2017/3/27.
//  Copyright © 2017年 张彦辉. All rights reserved.
//

import UIKit
import SnapKit

class UIImageViewDemo: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.gray
        let imageView = UIImageView()
        imageView.backgroundColor = UIColor.red
        self.view.addSubview(imageView)

        imageView.snp.makeConstraints { (maker) in
            maker.width.equalTo(80)
            maker.height.equalTo(80)
            maker.center.equalTo(self.view)
        }
        //设置圆角
        //imageView.layer.borderWidth = 2
        //imageView.layer.borderColor = UIColor.red.cgColor
        
        //设置阴影
        imageView.layer.shadowColor = UIColor.purple.cgColor
        imageView.layer.shadowOffset = CGSize(width: 10, height: 10)
        imageView.layer.shadowOpacity = 1
        

        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
